

package com.hazelcast.client.impl.protocol.codec.builtin;

import com.hazelcast.client.impl.protocol.ClientMessage;

public final class ByteArrayCodec {

    private ByteArrayCodec() {
    }

    public static void encode(ClientMessage clientMessage, byte[] bytes) {
        clientMessage.add(new ClientMessage.Frame(bytes));
    }

    public static byte[] decode(ClientMessage.ForwardFrameIterator iterator) {
        return iterator.next().content;
    }
}
